home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / kcl / akcl / akcl1615.lha / doc / procs.el < prev    next >
Text File  |  1989-09-28  |  1KB  |  39 lines

  1. (defun next-word ()
  2.     (let* ((pt (point)))
  3.       (forward-sexp)
  4.       (buffer-substring pt (point))))
  5.  
  6.  
  7. (defun get-defuns (n) (interactive "p")
  8.   (or n (setq n 1))
  9.   (while (>= (setq n (- n 1)) 0)
  10.     (cond ((search-forward "F" nil t) 
  11.     (let (f pack args lim pt def)
  12.       (setq pt (point))
  13.       (forward-char 1)
  14.       (setq lim (if (search-forward "" nil t) (point) nil))
  15.       (goto-char pt)
  16.       (setq f (next-word))
  17.       (next-line 1)
  18.       (beginning-of-line)
  19.       (setq def (next-word))
  20.       (cond ((equal def "Macro"))
  21.         ((equal def "Special"))
  22.         (t (search-forward "package:" lim)
  23.           (forward-sexp -2)
  24.           (setq pack (next-word))
  25.           (search-forward "Args:" lim)
  26. ;          (re-search-forward "\\(Args\\)\\|\\(Syntax\\):" lim)
  27.           (setq args (next-word))
  28.           (setq values  (re-search-forward "Values" lim t))
  29.           (other-window 1)
  30.           (cond ((equal def "Function")
  31.              (insert "(defun "  pack "::" f  args
  32.                  (if values " (MV)" " T")
  33.                  ")"))
  34.             (t (insert "(unknown " f ")")))
  35.           (insert ?\n)
  36.           (other-window 1)
  37.           )))))))
  38.  
  39.